package cn.edu.njuit.children.service;

import cn.edu.njuit.children.entity.Role;
import cn.edu.njuit.children.entity.UserAccount;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author Administrator
* @description 针对表【sys_user】的数据库操作Service
* @createDate 2022-11-29 08:58:00
*/
public interface UserService extends IService<UserAccount> {

    /**
     * 获取指定账户信息
     *
     * @param phone 登录名
     * @return UserAccount 账户数据对象
     */
    UserAccount getAccount(String phone);

    List<Role> getRoleByLogin(String phone);

    UserAccount regAccount(String login, String password, String defaultRole) throws Exception;

    boolean putPassword(String newPwd);
}
